<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/6/5
 * Time: 15:21
 */

namespace App\Admin\Controllers\ActionHandles;


class QiNiuUpToken
{
	public function __invoke()
	{
		$bucket = config('filesystems.disks.qiniu.bucket');
		$accessKey = config('filesystems.disks.qiniu.access_key');
		$secretKey = config('filesystems.disks.qiniu.secret_key');
		$auth = new \Qiniu\Auth($accessKey, $secretKey);
		$upToken = $auth->uploadToken($bucket);

		return [
			'domain'  => 'http://mj.website.vodegroup.com',
			'uptoken' => $upToken
		];
	}
}
